package com.keter.checker.model;

public class Target {
    private String url;
    private String res;
    private String status;
    private String error;
    long time;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getRes() {
        return res;
    }

    public void setRes(String res) {
        this.res = res;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    @Override
    public String toString(){
        if(!"OK".equals(this.getStatus())){
            return  this.getUrl()+
                    " - "+this.getTime()+"ms"+
                    " , "+this.getStatus()+
                    " , "+this.getError()+"\n";

        }
        return  this.getUrl()+
                " - "+this.getTime()+"ms"+
                " , "+this.getStatus()+"\n";
//                " , "+this.getRes()+"\n";
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }
}
